<template>
  <el-container>
    <el-header>
      <navcon></navcon>
    </el-header>
    <el-main>
      <router-view></router-view>
    </el-main>
    <el-footer>

    </el-footer>
  </el-container>
</template>
<script>
// 导入组件
import navcon from '../components/navcon.vue'
export default {
  name: 'index',
  data() {
    return {
      showclass: 'asideshow',
      showtype: false
    }
  },
  // 注册组件
  components: {
    navcon
  },
  methods: {},
  created() {
    // 监听
    this.$root.Bus.$on('toggle', value => {
      if (value) {
        this.showclass = 'asideshow'
      } else {
        setTimeout(() => {
          this.showclass = 'aside'
        }, 300)
      }
    })
  },
  beforeUpdate() {},
  // 挂载前状态(里面是操作)
  beforeMount() {

  }
}
</script>
<style >
  .el-header {
    padding: 0px;
    display: block;
    position: relative;
    z-index: 11;
    height: 60px;
    line-height: 60px;
    background-color: #1a1a1a;
    -webkit-box-shadow: 0 1px 2px #1a1a1a;
    box-shadow: 0 1px 2px #1a1a1a;
  }

  .el-main {
    display: block;
    width: 1340px;
    min-height: 90vh;
    margin: 0px auto;
    padding: 0px;
  }

  .el-footer {
    background: #1a1a1a;
    padding-bottom: 20px;
    background-color: #1a1a1a;
    -webkit-box-shadow: 0 1px 2px #1a1a1a;
    box-shadow: 0 1px 2px #1a1a1a;
  }
</style>
